<template>
  <div id="app">
    <h1>根组件{{count}}</h1>
    <h1>{{filterlist}}</h1>
    <input type="text">
    <add-item></add-item>
    <hr>
    <sub-item></sub-item>
  </div>
</template>

<script>
import { mapGetters, mapState } from 'vuex'
import AddItem from './components/add-item.vue'
import SubItem from './components/sub-item.vue'

export default {
  name: 'app',
  computed:{
    // count(){
    //   return this.$store.state.count
    // }
    ...mapState(["count"]),
    ...mapGetters(['filterlist'])
  },
  data: function () {
    return {
      
    }
  },
  components: {
    AddItem,
    SubItem
  }
}
</script>

<style>
#app {
  width: 600px;
  margin: 20px auto;
  border: 3px solid #ccc;
  border-radius: 3px;
  padding: 10px;
}
</style>